#ifndef FINDSCUDIALOG_H
#define FINDSCUDIALOG_H

#include <QDialog>
#include "../DicomService/findscuthread.h"
class ImportStudyModel;
class ImportStudyView;

namespace Ui {
class FindScuDialog;
}

class FindScuDialog : public QDialog
{
    Q_OBJECT

public:
    explicit FindScuDialog(QWidget *parent = 0);
    ~FindScuDialog();

    void setQRScp(const DicomScp &scp) { findThread->setQRScp(scp); }
    void setPatientId(const QString &id) { findThread->setPatientId(id); }
    void setPatientName(const QString &name) { findThread->setPatientName(name); }
    void setAccNumber(const QString &accNum) { findThread->setAccNumber(accNum); }
    void setModality(const QString &modality) { findThread->setModality(modality); }
    void setFromDateTime(const QDateTime &time) { findThread->setFromDateTime(time); }
    void setToDateTime(const QDateTime &time) { findThread->setToDateTime(time); }

    void startQuery(bool start = true) { if (start) findThread->start(); else findThread->setAbort(); }

    QStringList getSelectedStudyUids() const;

private:
    Ui::FindScuDialog *ui;

    ImportStudyModel *studyModel;
    ImportStudyView *studyView;
    FindSCUThread *findThread;
};

#endif // FINDSCUDIALOG_H
